<?php

/* @var $this yii\web\View */

$this->title = 'My Yii Application';
?>
<div class="site-index">

    <div class="row">
        <div class="col-md-5">
            <div class="box box-primary direct-chat direct-chat-primary">
                <div class="box-header with-border">
                  <h3 class="box-title">网站咨询</h3>
                  <div class="box-tools pull-right">
                    <!-- <span data-toggle="tooltip" title="3 New Messages" class="badge bg-yellow">3</span> -->
                    <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                  </div>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <!-- Conversations are loaded here -->
                  <div class="direct-chat-messages">
                    <!-- Message to the right -->
                      <?php foreach($list as $v){?>
                        <div class="direct-chat-msg right">
                          <div class="direct-chat-info clearfix">
                            <span class="direct-chat-name pull-right"><?=$v['usename']?></span>
                            <span class="direct-chat-timestamp pull-left"><?=date('Y-m-d H:i',$v['create_at'])?></span>
                          </div><!-- /.direct-chat-info -->
                          <img class="direct-chat-img" src="/upload/avatar.jpeg" alt="message user image"><!-- /.direct-chat-img -->
                          <div class="direct-chat-text">
                              <a href="/home/consult/view?id=<?=$v['id']?>" style="color:#fff;">
                                  问题咨询：<?=$v['question']?>
                              </a>
                          </div><!-- /.direct-chat-text -->
                        </div><!-- /.direct-chat-msg -->
                      <?php }?>
                  </div><!--/.direct-chat-messages-->

                </div><!-- /.box-body -->
                <div class="box-footer" style="text-align: right">
                  <a href="/home/consult/"><button type="button" class="btn btn-primary btn-flat">More</button></a>
                </div><!-- /.box-footer-->
            </div>
        </div>
    </div>
    
</div>
